package com.xl.controller;

import com.xl.service.UploadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

@RestController
public class UploadController {

    @Autowired
    private UploadService uploadService ;

    @PostMapping("/uploadFile")
    public String uploadFile(@RequestBody List<String> filePath , HttpServletResponse response){
        uploadService.uploadFile(filePath , response);
        return "hello_back" ;
    }

}
